package com.example.rocketmq_demo.concumer;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author xyh
 * 2022/1/14
 */
@Component
@RocketMQMessageListener(topic = "first-topic",consumerGroup = "my-producer-group")
public class Consumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        System.out.println(s);
    }
}
